<template>
  <div class="layoutSidebar1 cu-flex">
    <div class="cu-flex-average">
      <PanelView :title="title" bgClass="cmp-panel-cnt--large">
        <WsyjMoveInAndOutTrend></WsyjMoveInAndOutTrend>
      </PanelView>
    </div>
  </div>
</template>
<script lang="ts">
  import {Component, Vue, Prop, Watch} from 'vue-property-decorator';
  import PanelView from '@/components/common/panel/PanelView.vue';
  import WsyjMoveInAndOutTrend from "@/components/common/WsyjMoveInAndOutTrend.vue";
  import ZhtsStore from "@/store/wsyj/ZhtsModule/ZhtsStore";
  @Component({
    name: 'ZhtsBottom',
    components: {
      PanelView,
      WsyjMoveInAndOutTrend
    }
  })
  export default class ZhtsBottom extends Vue {

    private title = "迁入趋势图";

    @Watch('$store.state.ZhtsModule.moveInState')
    @Watch('$store.state.ZhtsModule.district.shortName')
    private getMoveInstate() {
      const state: string = ZhtsStore.state.moveInState.toString();
      if(state === '1') {
        this.title =  "迁入"+ZhtsStore.state.district.shortName+"趋势"
      } else {
        this.title = "迁出"+ZhtsStore.state.district.shortName+"趋势"
      }
    }
  }
</script>
<style lang="less" scoped>
  @import url('../../../assets/css/LayoutSidebar.less');
</style>

<style lang="less" scoped>
  .layoutSidebar1 {
    position: relative;
    height: 400px;
    width:830px;
    color: #fff;
    margin-left: 30px;
  }

  .cu-flex {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;

    .cu-flex-average {
      flex: 1 1;
      width: 100%;
      box-sizing: border-box;
    }
  }

</style>
